package com.hc.serviceimp;

import java.util.List;

import com.hc.dao.RepariDao;
import com.hc.daoimp.RepairDaoImpl;
import com.hc.entity.House;
import com.hc.entity.Logistics;
import com.hc.entity.Repair;
import com.hc.service.RepairService;

public class RepairServiceImpl implements RepairService {
	RepariDao rDao=new RepairDaoImpl();

	@Override
	public List<House> getallhouse() {
		List<House> houses = rDao.getallhouse();
		return houses;
	}

	@Override
	public List<Logistics> getalllogistics() {
		List<Logistics> logistics = rDao.getalllogistics();
		return logistics;
	}

	@Override
	public void add(Repair repair) {
		rDao.add(repair);
		
		
	}

	@Override
	public List<Repair> select(int id, String date) {
		List<Repair> select = rDao.select(id, date);
		
		return select;
	}

	@Override
	public void update(Repair repair) {
		rDao.update(repair);
		
	}

	//回显数据
	@Override
	public Repair show(int id) {
		Repair repair = rDao.show(id);
		return repair;
	}

	@Override
	public void delete(int id) {
		rDao.delete(id);
		System.out.println("删除成功");
		
	}
	

	
	
	
}
